package com.yzd.learnjava.reusing;

import com.yzd.learnjava.util.Print;

public class Sub extends Base{
	Sub(){
		Print.print("Sub Constructor");
	}
	public static void main(String[] args) {
		Sub s1 = new Sub();
		Sub s2 = new Sub();
		
		s1.setString("s1s1s1");
		Print.print(s1.getString());
		Print.print(s2.getString());
	}

}


class Base{
	private String string ;

	Base(){
		Print.print("Base Constructor");
	}
	public String getString() {
		return string;
	}

	public void setString(String string) {
		this.string = string;
	}
	
	
}